]> dgit.raspbian.org Git - gnome-shell.git/commit
StWidget: don't forget to invalidate the paint state if not on stage
authorCosimo Cecchi <cosimo@endlessm.com>
Wed, 21 Nov 2018 02:25:51 +0000 (18:25 -0800)
committerCosimo Cecchi <cosimo.cecchi@gmail.com>
Tue, 4 Dec 2018 15:52:36 +0000 (15:52 +0000)
commit6743c18fdfa6dc48fb7d920640debe863018dd38
tree24c9d7f4eeea560471c84513dfa7681d1753154e
parent4d649d6ee8a3a4e2d2805243a01d96d6a7ae3725
StWidget: don't forget to invalidate the paint state if not on stage

If the actor is not on the stage yet (i.e. does not have a theme
node), but has a paint state cached, we currently fail to invalidate
it, which will lead to the actor painting with old contents once it
gets onto the stage.

This commit fixes the issue by changing our invalidation strategy;
previously we were looking at the widget's own theme node to determine
if it should be invalidated or not.
Now we look at the theme nodes of our cached paint states. When the
widget is mapped on stage, those are the same as the widget's own
theme node, but when the widget is not on the stage, we'll still be
able to invalidate them.

As part of this, we move the invalidation API to StThemeNodePaintState,
which is a more natural place for our use case.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/314
src/st/st-theme-node-drawing.c
src/st/st-theme-node.h
src/st/st-widget.c